package com.tongsys.server.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@TableName("department")
@ApiModel(value = "Department对象", description = "")
public class Department implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Integer id;

    @ApiModelProperty("部门名称")
    @TableField("department_name")
    private String departmentName;

    @ApiModelProperty("部门电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("部门地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("上级部门")
    @TableField("pid")
    private Integer pid;

    @ApiModelProperty("上级部门名称")
    @TableField("parent_name")
    private String parentName;

    @ApiModelProperty("排序")
    @TableField("order_name")
    private Integer orderName;

    @ApiModelProperty("是否有效  0 有效")
    @TableField("is_delete")
    private Byte isDelete;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_tm",fill = FieldFill.INSERT)
    private Date createTm;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_tm",fill = FieldFill.INSERT_UPDATE)
    private Date updateTm;
}
